Class KEMAlgorithm

java.lang.Object
org.mozilla.jss.crypto.Algorithm
org.mozilla.jss.crypto.KEMAlgorithm

public class KEMAlgorithm extends Algorithm
Represents a Key Encapsulation Mechanism (KEM) algorithm. KEM is a cryptographic primitive used to establish a shared secret between two parties, typically for key exchange. Unlike traditional key exchange mechanisms, KEM algorithms are designed to be secure against quantum computer attacks. This class currently supports ML-KEM (Module-Lattice-based Key Encapsulation Mechanism) variants, which are post-quantum cryptography algorithms standardized in FIPS 203. ML-KEM was previously known as CRYSTALS-Kyber. Each KEM algorithm has associated parameters including:
  • Secret size - the size of the shared secret generated
  • Cipher size - the size of the encapsulated ciphertext
See Also:
  • Field Details

    • oidMap

      private static final Map<OBJECT_IDENTIFIER,KEMAlgorithm> oidMap
    • secretSize

      private int secretSize
    • cipherSize

      private int cipherSize
    • MLKEM512

      public static final KEMAlgorithm MLKEM512
      ML-KEM-512 algorithm providing security level 1 (equivalent to AES-128).
      • OID: 2.16.840.1.101.3.4.4.1
      • Secret size: 32 bytes
      • Ciphertext size: 768 bytes
    • MLKEM768

      public static final KEMAlgorithm MLKEM768
      ML-KEM-768 algorithm providing security level 3 (equivalent to AES-192).
      • OID: 2.16.840.1.101.3.4.4.2
      • Secret size: 32 bytes
      • Ciphertext size: 1088 bytes
    • MLKEM1024

      public static final KEMAlgorithm MLKEM1024
      ML-KEM-1024 algorithm providing security level 5 (equivalent to AES-256).
      • OID: 2.16.840.1.101.3.4.4.3
      • Secret size: 32 bytes
      • Ciphertext size: 1568 bytes
  • Constructor Details

    • KEMAlgorithm

      public KEMAlgorithm(int oidIndex, String name, OBJECT_IDENTIFIER oid, int secretSize, int cipherSize)
  • Method Details